package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 数据库管理对象 sys_database
 * 
 * @author ruoyi
 */
public class Database extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 数据库ID */
    private Long dbId;

    /** 数据库名称 */
    @Excel(name = "数据库名称")
    private String dbName;

    /** 服务器ID */
    @Excel(name = "服务器ID")
    private Long serverId;

    /** 服务器名称 */
    @Excel(name = "服务器名称")
    private String serverName;

    /** 数据库类型 */
    @Excel(name = "数据库类型")
    private String dbType;

    /** 连接地址 */
    @Excel(name = "连接地址")
    private String dbHost;

    /** 端口 */
    @Excel(name = "端口")
    private String dbPort;

    /** 数据库实例名 */
    @Excel(name = "数据库实例名")
    private String dbInstance;

    /** 用户名 */
    @Excel(name = "用户名")
    private String dbUsername;

    /** 密码 */
    private String dbPassword;

    /** 备份路径 */
    private String backupPath;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 备份ID */
    private Long backupId;

    public void setDbId(Long dbId) 
    {
        this.dbId = dbId;
    }

    public Long getDbId() 
    {
        return dbId;
    }
    
    public void setDbName(String dbName) 
    {
        this.dbName = dbName;
    }

    public String getDbName() 
    {
        return dbName;
    }
    
    public void setServerId(Long serverId) 
    {
        this.serverId = serverId;
    }

    public Long getServerId() 
    {
        return serverId;
    }
    
    public void setServerName(String serverName) 
    {
        this.serverName = serverName;
    }

    public String getServerName() 
    {
        return serverName;
    }
    
    public void setDbType(String dbType) 
    {
        this.dbType = dbType;
    }

    public String getDbType() 
    {
        return dbType;
    }
    
    public void setDbHost(String dbHost) 
    {
        this.dbHost = dbHost;
    }

    public String getDbHost() 
    {
        return dbHost;
    }
    
    public void setDbPort(String dbPort) 
    {
        this.dbPort = dbPort;
    }

    public String getDbPort() 
    {
        return dbPort;
    }
    
    public void setDbInstance(String dbInstance) 
    {
        this.dbInstance = dbInstance;
    }

    public String getDbInstance() 
    {
        return dbInstance;
    }
    
    public void setDbUsername(String dbUsername) 
    {
        this.dbUsername = dbUsername;
    }

    public String getDbUsername() 
    {
        return dbUsername;
    }
    
    public void setDbPassword(String dbPassword) 
    {
        this.dbPassword = dbPassword;
    }

    public String getDbPassword() 
    {
        return dbPassword;
    }
    
    public void setBackupPath(String backupPath) 
    {
        this.backupPath = backupPath;
    }

    public String getBackupPath() 
    {
        return backupPath;
    }
    
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    
    public void setBackupId(Long backupId) 
    {
        this.backupId = backupId;
    }

    public Long getBackupId() 
    {
        return backupId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("dbId", getDbId())
            .append("dbName", getDbName())
            .append("serverId", getServerId())
            .append("serverName", getServerName())
            .append("dbType", getDbType())
            .append("dbHost", getDbHost())
            .append("dbPort", getDbPort())
            .append("dbInstance", getDbInstance())
            .append("dbUsername", getDbUsername())
            .append("dbPassword", getDbPassword())
            .append("backupPath", getBackupPath())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
} 